﻿using System.Collections.Generic;

namespace Coding4Fun.BoxingBots.Common
{
	public static class Settings
	{
		private static Dictionary<Player,NetworkSettings> _settings = new Dictionary<Player,NetworkSettings>();

		public const int RoundLength = 90;
		public const int MaxRobotHealth = 8;
		public const double RobotSpeed = .6;

		public const double XboxTriggerThreshold = 0.25;
		public const double RobotDeadzone = .1;
		public const bool IsRobotMotorsEnabled = true;

		public static Dictionary<Player, NetworkSettings> NetworkSettings
		{
			get { return _settings; }
		}

		static Settings()
		{
			// Sheldon
			_settings[Player.One] = new NetworkSettings
			{
				//RobotIpAddress = "127.0.0.1",
				//UserConsoleIpAddress = "127.0.0.1",
				
				RobotIpAddress = "192.168.1.20",
				UserConsoleIpAddress = "192.168.1.30",
				ColorPort = 4530,
				SkeletonPort = 4532,
				AudioPort = 4533,
				DataPort = 4534,
				RobotDataPort = 4535,
				RobotColorPort = 4530,
			};


			// Howard
			_settings[Player.Two] = new NetworkSettings
			{
				//RobotIpAddress = "127.0.0.1",
				//UserConsoleIpAddress = "127.0.0.1",
				RobotIpAddress = "192.168.1.21",
				UserConsoleIpAddress = "192.168.1.31",
				
				ColorPort = 4530,
				SkeletonPort = 4532,
				AudioPort = 4533,
				DataPort = 4534,
				RobotDataPort = 4535,
				RobotColorPort = 4530,
			};
		}
	}
}
